
<link rel="stylesheet" href="html/createOrder/jquery/easyui/themes/default/easyui.css">
<link rel="stylesheet" href="html/createOrder/jquery/easyui/themes/icon.css">
<body>
<div style="width: 100%;height: 87%">
    <table id="easyui_datagrid_data_basic_set" style="border:1px solid blue" >

    </table>
</div>

<div id="dlg" class="easyui-dialog" style="width:400px" closed="true" buttons="#dlg-buttons">
    <form id="fm" method="post" novalidate style="margin:0;padding:20px 50px">
<!--
        <div style="margin-bottom:20px;font-size:14px;border-bottom:1px solid #ccc">User Information</div>
-->
        <div style="margin-bottom:10px">
            <select class="easyui-combobox" name="html_type" required label="类型" style="width:100%">
                <option value="">请选择</option>
                <option value="select">下拉框</option>
            </select>

        </div>
        <div style="margin-bottom:10px">
            <input name="html_type_val" class="easyui-textbox" label="参数:" style="width:100%">
        </div>
    </form>
</div>
<div id="dlg-buttons">
    <a href="javascript:void(0)" class="easyui-linkbutton c6" iconCls="icon-ok" onclick="saveUser()" style="width:90px">Save</a>
    <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dlg').dialog('close')" style="width:90px">Cancel</a>
</div>


<script src="https://upload.shinehao.com.cn/20180816150739jquery-1.8.3.min.js"></script>
<script src="https://upload.shinehao.com.cn/20180816145716jquery.easyui.min.js"></script>
<script src="https://upload.shinehao.com.cn/20180816151727easyui-lang-zh_CN.js"></script>
<script>

var cpLock = false;
$(function(){
    $('#easyui_datagrid_data_basic_set').combogrid({
        mode:"remote",
        url:"/weixin/workOrder/getOrderTree",
        queryParams: {
            
        },
        idField: 'id',
        textField: 'text',
        columns:[[
        	{field:'ck',checkbox:true},
            {field:'id',title:'id'},
            {field:'text',title:'工厂型号'},
            {field:'companyOrderNo',title:'订单编号',align:"center"}
        ]],
        height:"10%",
        width:"80%",
        panelWidth:"100%",
        panelHeight:"88%",
        //pagination:false,
        loadMsg:"加载中,请等待...",
        singleSelect:true,
        align:"center",
        loadFilter: function(data){
          return data.data;  
        },
        onLoadSuccess:function(row){//当表格成功加载时执行                 
			var rowData = row.rows;  
			$.each(rowData,function(idx,val){//遍历JSON  
				console.info(val);
				console.info(window.parent.page._this_selectDialog_val);
				if(window.parent.page._this_selectDialog_val==val.id){  
					$("#easyui_datagrid_data_basic_set").combogrid('grid').datagrid("selectRow", idx);//如果后台传过来的数据表示要选中，则此表示一记载就选中  
				}  
			});                
		},
		onSelect:function(){
			setTimeout(function(){$('#easyui_datagrid_data_basic_set').combogrid("showPanel");},1)
		}

    });
    $('#easyui_datagrid_data_basic_set').combogrid("showPanel");
    
})
function getSelectRows(){
	var g = $("#easyui_datagrid_data_basic_set").combogrid('grid');
    var rows = g.datagrid('getSelections');	//获取表格当前选中行
    return rows;
}


</script>
</body>


























